package ytdp.careagle.com.ytdp.myview.indexbar_packet;

import ytdp.careagle.com.ytdp.R;
import ytdp.careagle.com.ytdp.adapter.base.*;
import ytdp.careagle.com.ytdp.adapter.base.ViewHolder;

/**
 * Created by lida on 2017/7/27 0027.
 */

public class CityAdapter2 implements ItemViewDelegate<CityBean> {

    @Override
    public int getItemViewLayoutId() {
        return R.layout.layout_item_header;
    }

    @Override
    public boolean isForViewType(CityBean item, int position) {
        return item.getType() == 1;
    }

    @Override
    public void convert(ViewHolder holder, CityBean chatMessage, int position) {
        holder.setText(R.id.tv_title, chatMessage.getCity());
    }

}